package com.huyaanalysisplatform.controller;


import com.huyaanalysisplatform.entity.TBlueRay;
import com.huyaanalysisplatform.entity.TLolHotHero;
import com.huyaanalysisplatform.service.TBlueRayService;
import com.huyaanalysisplatform.service.TLolHotHeroService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import com.huyaanalysisplatform.controller.BaseController;

import java.util.Map;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Huadi Group 12
 * @since 2021-08-01
 */
@RestController
@RequestMapping("/blueray")
@CrossOrigin
public class TBlueRayController extends BaseController {

    @Autowired
    TBlueRayService tBlueRayService;

    @RequestMapping({""})//功能11
    @ResponseBody
    public Map queryHotHero() {
        Map map;
        map = tBlueRayService.queryAll();
        return map;
    }

    @RequestMapping({"/add"})//功能11
    @ResponseBody
    public Map addHotHero(@RequestBody TBlueRay tBlueRay) {
        Map map;
        map = tBlueRayService.addBlueRay(tBlueRay);
        return map;
    }

    @RequestMapping({"/edit"})//功能11
    @ResponseBody
    public Map editHotHero(@RequestBody  TBlueRay tBlueRay) {
        Map map;
        map = tBlueRayService.editBlueRay(tBlueRay);
        return map;
    }

    @RequestMapping({"/delete"})//功能11
    @ResponseBody
    public Map editHotHero(String id) {
        Map map;
        map = tBlueRayService.deleteBlueRay(id);
        return map;
    }

}
